import request from '@/utils/request'

export default {
  //查询标的详情
  getById(id) {
    return request({
      url: `/admin/core/lend/${id}`,
      method: 'GET'
    })
  },
  //发布标的
  lendPublish(id) {
    return request({
      url: `/admin/core/lend/publish/${id}`,
      method: 'PUT'
    })
  },
  //查询所有标的列表
  list() {
    return request({
      url: '/admin/core/lend',
      method: 'GET'
    })
  },
  //放款
  makeLoan(id) {
    return request({
      url: `/admin/core/lend/makeLoan/${id}`,
      method: 'PUT'
    })
  }
}
